<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>练习5</title>
    <style>
        li{
            list-style: none;
        }
        ol li{
            padding-bottom: 20px;
            padding: 10px;
            margin-bottom: 10px;
        }
        li:has(a[title][href^="http"]){
            border: 5px solid pink;
        }
        li:has(a[href*=contact]){
            border: 5px solid orange;
        }
        li:has(a[href^="http"]){
            border: 5px solid green;
        }

    </style>
</head>
<body>
    <div class="container">
        <ol>
          <li><a href="https://example.com">Link 1</a></li>
          <li>
            <a href="http://example.com" title="Visit example.com">Link 2</a>
          </li>
          <li><a href="/contact">Link 3</a></li>
          <li><a href="../contact/index.html">Link 4</a></li>
        </ol>
      </div>
</body>
</html>